<template>
  <div class="container">
    <MainNav
        :all-categories="allCategories"
        @login-success="handleLoginSuccess"
        @logout="handleLogout"
        @show-login="showLoginModal = true"
    />

    <header class="header">
      <h1 class="site-title">订阅计划</h1>
      <p class="page-description">选择适合您的金融资讯订阅方案，获取更深度的市场分析和关联数据</p>

      <div
          class="login-prompt"
          v-if="!isLoggedIn"
          :class="{ 'pulse': !isLoggedIn }"
      >
        <Icon name="material-symbols:lock" class="lock-icon" />
        <span>登录后即可订阅并享受高级功能</span>
      </div>
    </header>

    <main class="subscription-plans">
      <div class="plan-card free-plan">
        <div class="plan-header">
          <div class="plan-badge">基础</div>
          <h2 class="plan-title">免费计划</h2>
          <div class="plan-price">
            <span class="price">¥0</span>
            <span class="period">/永久</span>
          </div>
        </div>

        <div class="plan-features">
          <h3 class="features-title">包含功能</h3>
          <ul class="features-list">
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>每日基础金融资讯</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>有限的市场数据查看</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>简单关联分析</span>
            </li>
            <li class="feature-item excluded">
              <Icon name="material-symbols:close" class="feature-icon" />
              <span>深度市场洞察</span>
            </li>
            <li class="feature-item excluded">
              <Icon name="material-symbols:close" class="feature-icon" />
              <span>定制化资讯推送</span>
            </li>
          </ul>
        </div>

        <div class="plan-action">
          <button
              class="select-btn"
              :disabled="!isLoggedIn"
              @click="selectPlan('free')"
          >
            <!-- 动态显示按钮文本 -->
            {{ currentPlan === 'free' ? '当前方案' : '选择方案' }}
          </button>
        </div>
      </div>

      <div class="plan-card standard-plan popular">
        <div class="popular-badge">最受欢迎</div>
        <div class="plan-header">
          <div class="plan-badge">进阶</div>
          <h2 class="plan-title">标准计划</h2>
          <div class="plan-price">
            <span class="price">¥29</span>
            <span class="period">/月</span>
          </div>
          <div class="plan-saving">
            年付节省20%，仅¥288/年
          </div>
        </div>

        <div class="plan-features">
          <h3 class="features-title">包含功能</h3>
          <ul class="features-list">
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>全部免费计划功能</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>实时市场数据更新</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>详细关联分析报告</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>行业专家解读</span>
            </li>
            <li class="feature-item excluded">
              <Icon name="material-symbols:close" class="feature-icon" />
              <span>定制化资讯推送</span>
            </li>
          </ul>
        </div>

        <div class="plan-action">
          <button
              class="select-btn"
              :disabled="!isLoggedIn"
              @click="isLoggedIn ? selectPlan('standard') : showLoginModal = true"
          >
            <!-- 动态显示按钮文本 -->
            {{ currentPlan === 'standard' ? '当前方案' : '选择方案' }}
          </button>
        </div>
      </div>

      <div class="plan-card premium-plan">
        <div class="plan-header">
          <div class="plan-badge">专业</div>
          <h2 class="plan-title">高级计划</h2>
          <div class="plan-price">
            <span class="price">¥99</span>
            <span class="period">/月</span>
          </div>
          <div class="plan-saving">
            年付节省30%，仅¥831/年
          </div>
        </div>

        <div class="plan-features">
          <h3 class="features-title">包含功能</h3>
          <ul class="features-list">
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>全部标准计划功能</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>深度市场洞察分析</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>定制化资讯推送</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>投资组合分析工具</span>
            </li>
            <li class="feature-item included">
              <Icon name="material-symbols:check" class="feature-icon" />
              <span>优先客户支持</span>
            </li>
          </ul>
        </div>

        <div class="plan-action">
          <button
              class="select-btn"
              :disabled="!isLoggedIn"
              @click="isLoggedIn ? selectPlan('premium') : showLoginModal = true"
          >
            <!-- 动态显示按钮文本 -->
            {{ currentPlan === 'premium' ? '当前方案' : '选择方案' }}
          </button>
        </div>
      </div>
    </main>

    <section class="faq-section">
      <h2 class="faq-title">常见问题</h2>
      <div class="faq-items">
        <div class="faq-item" v-for="(faq, index) in faqs" :key="index">
          <button
              class="faq-question"
              @click="toggleFaq(index)"
              :aria-expanded="faq.expanded"
          >
            <span>{{ faq.question }}</span>
          </button>
          <div
              class="faq-answer"
              :style="{
              maxHeight: faq.expanded ? '500px' : '0',
              opacity: faq.expanded ? 1 : 0,
              padding: faq.expanded ? '15px 20px 20px' : '0 20px'
            }"
          >
            {{ faq.answer }}
          </div>
        </div>
      </div>
    </section>

    <footer class="footer">
      <MainFooter />
    </footer>

    <div
        class="success-modal-overlay"
        :class="{ 'active': showSuccessModal }"
        @click="showSuccessModal = false"
    >
      <div class="success-modal" @click.stop>
        <div class="success-icon-container">
          <Icon name="material-symbols:check-circle" class="success-icon" />
        </div>
        <h3 class="success-title">订阅成功!</h3>
        <p class="success-message">
          您已成功订阅 <strong>{{ selectedPlanName }}</strong> 计划，感谢您的支持！
        </p>
        <button
            class="success-btn"
            @click="showSuccessModal = false"
        >
          确认
        </button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import MainNav from '@/components/MainNav/MainNav.vue';
import MainFooter from '@/components/Footer/MainFooter.vue';

useHead({
  title: '订阅计划 - 金融简讯',
  titleTemplate: '%s | 金融简讯',
  meta: [
    {
      name: 'description',
      content: '选择适合您的金融简讯订阅方案，获取更深度的市场分析和关联数据，助您把握投资机会。'
    },
    {
      name: 'keywords',
      content: '金融简讯订阅, 金融资讯会员, 市场分析订阅, 投资资讯套餐'
    }
  ]
});

// 定义用户信息接口
interface User {
  id: string;
  name: string;
  email: string;
  avatar: string;
}

// 定义FAQ接口
interface FAQ {
  question: string;
  answer: string;
  expanded: boolean;
}

// 登录状态管理
const isLoggedIn = ref<boolean>(false);
const userInfo = ref<User>({
  id: '',
  name: '',
  email: '',
  avatar: ''
});
const showLoginModal = ref<boolean>(false);

// 订阅相关状态
const showSuccessModal = ref<boolean>(false);
const selectedPlan = ref<string>('');
// 新增：当前选中的计划，默认为免费计划
const currentPlan = ref<string>('free');

const selectedPlanName = computed<string>(() => {
  const planNames = {
    'free': '免费',
    'standard': '标准',
    'premium': '高级'
  };
  return planNames[selectedPlan.value as keyof typeof planNames] || '';
});

// FAQ数据
const faqs = ref<FAQ[]>([
  {
    question: '如何选择适合我的订阅计划？',
    answer: '免费计划适合初次体验的用户，提供基础资讯服务；标准计划适合需要深入了解市场动态的投资者；高级计划则为专业投资者提供全方位的深度分析和定制化服务。您可以根据自己的投资需求和频率选择最合适的计划。',
    expanded: false
  },
  {
    question: '订阅后可以随时取消吗？',
    answer: '是的，所有付费订阅计划都支持随时取消。月度订阅取消后，当前计费周期结束前仍可享受服务；年度订阅取消后，我们将按比例退还剩余期限的费用，具体退款政策请参考用户协议。',
    expanded: false
  },
  {
    question: '不同订阅计划的数据更新频率有何不同？',
    answer: '免费计划提供每日一次的资讯更新；标准计划提供实时资讯推送和每小时市场数据更新；高级计划享有优先数据推送权，关键市场变动将在10分钟内推送，并提供专属分析师解读。',
    expanded: false
  },
  {
    question: '如何更改我的订阅计划？',
    answer: '登录后，您可以在"账户设置-订阅管理"中随时升级或降级您的订阅计划。升级将立即生效，差额按比例计算；降级将在当前计费周期结束后生效。',
    expanded: false
  },
  {
    question: '是否提供企业级订阅服务？',
    answer: '是的，我们为金融机构、企业客户提供定制化的企业级订阅服务，包括API接口对接、专属数据导出、多用户账户管理等功能。详情请联系我们的商务团队获取定制方案。',
    expanded: false
  }
]);

// 获取所有分类（空数组，实际项目中根据需求填充）
const allCategories = computed<string[]>(() => []);

// 处理登录成功
const handleLoginSuccess = (user: User) => {
  isLoggedIn.value = true;
  userInfo.value = user;
  showLoginModal.value = false;
  // 保存用户信息到本地存储
  localStorage.setItem('userInfo', JSON.stringify(user));

  // 如果用户有保存的订阅计划，加载它
  const savedPlan = localStorage.getItem('currentPlan');
  if (savedPlan) {
    currentPlan.value = savedPlan;
  }
};

// 处理退出登录
const handleLogout = () => {
  isLoggedIn.value = false;
  userInfo.value = {
    id: '',
    name: '',
    email: '',
    avatar: ''
  };
  localStorage.removeItem('userInfo');
  // 退出登录时重置为免费计划
  currentPlan.value = 'free';
  localStorage.removeItem('currentPlan');
};

// 切换FAQ展开/折叠
const toggleFaq = (index: number) => {
  faqs.value[index]!.expanded = !faqs.value[index]!.expanded;
};

// 选择订阅计划
const selectPlan = (plan: string) => {
  if (!isLoggedIn.value) {
    showLoginModal.value = true;
    return;
  }

  // 如果选择的是当前已选计划，不做处理
  if (currentPlan.value === plan) {
    return;
  }

  selectedPlan.value = plan;
  // 更新当前选中的计划
  currentPlan.value = plan;
  // 保存当前计划到本地存储
  localStorage.setItem('currentPlan', plan);

  // 这里可以添加实际订阅逻辑
  showSuccessModal.value = true;

  // 调用后端API的逻辑
  console.log(`用户 ${userInfo.value.name} 订阅了 ${plan} 计划`);
};

// 页面加载时检查登录状态和当前订阅计划
onMounted(() => {
  const savedUser = localStorage.getItem('userInfo');
  if (savedUser) {
    try {
      userInfo.value = JSON.parse(savedUser);
      isLoggedIn.value = true;

      // 检查是否有保存的订阅计划
      const savedPlan = localStorage.getItem('currentPlan');
      if (savedPlan) {
        currentPlan.value = savedPlan;
      }
    } catch (e) {
      console.error('解析用户信息失败', e);
    }
  }
});
</script>

<style scoped>
/* 样式部分保持不变 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  font-family: "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}


.container {
  max-width: 1000px; /* 与首页统一宽度 */
  margin: 0 auto;
  padding: 15px;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  min-height: 100vh;
}

/* 页面头部样式 - 与首页统一 */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-title {
  font-size: 2.2rem;
  margin: 0 0 15px 0;
  color: #222;
  position: relative;
  display: inline-block;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.site-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3498db, transparent);
  border-radius: 3px;
}

.page-description {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

/* 登录提示 */
.login-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  padding: 12px 20px;
  background-color: rgba(52, 152, 219, 0.08);
  border: 1px dashed #3498db;
  border-radius: 8px;
  color: #2980b9;
  font-size: 0.95rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.login-prompt.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.2); }
  70% { box-shadow: 0 0 0 8px rgba(52, 152, 219, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

.lock-icon {
  color: #3498db;
  font-size: 1.2rem;
}

/* 订阅计划卡片区域 */
.subscription-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 0 auto 60px;
}

.plan-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 600px;
}

.plan-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transform: translateX(2px);
  border-color: #f0f0f0;
}

.plan-card.popular {
  border-color: #3498db;
}

.popular-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(90deg, #3498db, #2980b9);
  color: white;
  padding: 4px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(45deg) translate(30px, -45px);
  transform-origin: top right;
  width: 160px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1;
}

/* 计划头部 */
.plan-header {
  padding: 30px 30px 20px;
  text-align: center;
  border-bottom: 1px solid #f5f5f5;
  height: 180px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  letter-spacing: 0.3px;
}

.free-plan .plan-badge {
  background-color: #3498db;
  color: white;
}

.standard-plan .plan-badge {
  background-color: #2ecc71;
  color: white;
}

.premium-plan .plan-badge {
  background-color: #f39c12;
  color: white;
}

.plan-title {
  font-size: 1.8rem;
  margin: 0 0 15px;
  color: #222;
  font-weight: 700;
}

.plan-price {
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #222;
  line-height: 1;
}

.period {
  color: #777;
  font-size: 1rem;
}

.plan-saving {
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: rgba(231, 76, 60, 0.05);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-top: auto;
}

/* 计划功能列表 */
.plan-features {
  padding: 25px 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.features-title {
  font-size: 1.1rem;
  margin: 0 0 18px;
  color: #444;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-left: 5px;
  position: relative;
  transition: all 0.2s ease;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-item:hover {
  transform: translateX(5px);
}

.feature-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 2px;
  height: 16px;
  opacity: 0;
  transition: all 0.2s ease;
}

.feature-item.included::before {
  background-color: #2ecc71;
}

.feature-item.excluded::before {
  background-color: #e74c3c;
}

.feature-item:hover::before {
  opacity: 1;
}

.feature-icon {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1.2rem;
}

.feature-item.included .feature-icon {
  color: #2ecc71;
}

.feature-item.excluded .feature-icon {
  color: #e74c3c;
}

.feature-item.included {
  color: #333;
}

.feature-item.excluded {
  color: #999;
  text-decoration: line-through;
}

/* 选择按钮区域 - 与首页按钮风格统一 */
.plan-action {
  padding: 0 30px 30px;
  margin-top: auto;
}

.select-btn {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e1e4e8;
  background-color: transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.select-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
  transition: transform 0.6s ease;
}

.select-btn:hover::before {
  transform: translateX(100%);
}

.select-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.free-plan .select-btn {
  color: #3498db;
  border-color: #3498db;
}

.standard-plan .select-btn {
  color: #2ecc71;
  border-color: #2ecc71;
  background-color: rgba(46, 204, 113, 0.05);
}

.standard-plan .select-btn:hover {
  background-color: rgba(46, 204, 113, 0.1);
}

.premium-plan .select-btn {
  color: #f39c12;
  border-color: #f39c12;
}

.premium-plan .select-btn:hover {
  background-color: #fff7e6;
}

.select-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.select-btn:disabled:hover {
  background-color: transparent;
}

/* 常见问题区域 */
.faq-section {
  max-width: 900px;
  margin: 0 auto 60px;
}

.faq-title {
  font-size: 1.8rem;
  text-align: center;
  margin: 0 0 40px;
  color: #222;
  font-weight: 700;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.faq-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 15%;
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3498db, transparent);
  border-radius: 3px;
}

.faq-items {
  border-radius: 10px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

.faq-question:hover {
  background-color: #f9f9f9;
}

.faq-answer {
  background-color: #f9f9f9;
  color: #555;
  overflow: hidden;
  transition: all 0.4s ease;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 页脚 - 与首页统一 */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 25px 15px 15px;
  border-top: 1px solid #eee;
}

/* 订阅成功弹窗 */
.success-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.success-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.success-modal {
  background-color: white;
  border-radius: 8px;
  padding: 40px 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

.success-modal-overlay.active .success-modal {
  transform: translateY(0) scale(1);
}

.success-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(46, 204, 113, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.success-icon {
  color: #2ecc71;
  font-size: 3rem;
}

.success-title {
  font-size: 1.5rem;
  margin: 0 0 15px;
  color: #222;
  font-weight: 700;
}

.success-message {
  color: #666;
  margin: 0 0 30px;
  font-size: 1rem;
  line-height: 1.6;
}

.success-message strong {
  color: #222;
}

.success-btn {
  background-color: #3498db;
  color: white;
  border: 1px solid #3498db;
  padding: 10px 30px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.success-btn:hover {
  background-color: #2980b9;
  border-color: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 响应式样式 - 与首页统一断点 */
@media (max-width: 768px) {

  .container {
    padding: 10px;
  }

  .site-title {
    font-size: 1.8rem;
    letter-spacing: -0.3px;
  }

  .subscription-plans {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .page-description {
    font-size: 1rem;
    padding: 0 15px;
  }

  .faq-title {
    font-size: 1.5rem;
  }

  .faq-question {
    font-size: 1rem;
    padding: 18px 15px;
  }

  .plan-header,
  .plan-features,
  .plan-action {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .header {
    margin-bottom: 20px;
  }

  .site-title {
    font-size: 1.7rem;
  }

  .login-prompt {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .price {
    font-size: 2.2rem;
  }

  .success-modal {
    padding: 30px 20px;
  }

  .plan-card {
    min-height: 550px;
  }
}
</style>
